{template('../public/header.html')}

<style>
table td { word-break: break-all; }
.explain_col a { color: #50B08C; }
.explain_col a.on { color: #008EBD; }
</style>

<form id="info_form" action="{:u(module_name & '/' & action_name)}" method="post" enctype="multipart/form-data">
<div class="pad_10">

    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
            <td>
            <div class="explain_col">
            	<a href="{:u(module_name & '/index')}"{if action_name='index'} class="on"{/if}>歌曲列表</a> &nbsp;&nbsp;  |  &nbsp;&nbsp;
            	<a href="{:u(module_name & '/geshou')}"{if action_name='config'} class="on"{/if}>歌手管理</a>
        	</div>
            </td>
            </tr>
        </tbody>
    </table>

	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">基本信息</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
		            <tr>
						<th>媒体名称：</th>
						<td>
							<input type="text" name="song_name" id="song_name" class="input-text" size="40" value="{$rs('song_name')}" />
						</td>
					</tr>
		            <tr>
						<th>歌手/艺人：</th>
						<td>
							<input type="hidden" name="artist_id" id="artist_id" value="{$rs('artist_id')}" />
							<input type="button" id="sel_btn" class="btn J_selectdialog" value="请选择" data-id="select" 
							data-uri="{:U(module_name & '/select_cate')}" data-title="选择歌手/艺人" data-param="&id={:App.Req("id")}" 
							data-formid="select_form" data-width="500" data-height="300" data-callback="load_parent" />
							<span id="parent_name" style="color:blue">{:M('music_artist')().Find(IntVal(rs('artist_id'))).getField('artist_name')}</span>
							<!-- data-return="true" data-for="" data-sid="" data-fun="" --> 
						</td>
					</tr>
		            <tr>
						<th>媒体地址：</th>
						<td>
							<input type="text" name="mp3url" id="mp3url" class="input-text" size="90" value="{$rs('mp3url')}" />
						</td>
					</tr>
		            <tr>
						<th>歌词：</th>
						<td>
							<textarea rows="15" cols="90" name="lyrics" id="lyrics">{$rs('lyrics')}</textarea>
		                </td>
					</tr>
				</table>
			</div>
        </div>
		<div class="mt10"><input type="submit" value="{:L('submit')}" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
<input type="hidden" name="menuid"  value="{$menuid}"/>
<input type="hidden" name="id" id="id" value="{$rs("id")}" />
</form>
{template('../public/footer.html')}

<script type="text/javascript">
function load_parent(a,b) {
	var ids = [];
	var dom = $('input[name="classid"]:checked', a);
	dom.each(function() {
		var val = $(this).val();
		if(val>0) ids.push(val);
	});
	var pid = ids.join(',');
	$('#classid').val(pid);
	$('#sel_btn').attr('data-param','&pid='+pid);
	$('#parent_name').load('{:U(module_name & "/ajax_load_pid")}'+'&pid='+pid);
	b.close(); //关闭窗口
}
</script>
</body>
</html>